﻿@model Models.Category

@{
    ViewBag.Title = "Update Category";
}
<div style="float: left; height: 70px"><a href="/admin/index" ><img src="/Content/images/back.png" /></a></div>
<div style="margin-left: 80px; text-align: center; width: 100px"><a href="/admin/Categories" ><img src="/content/images/category_all.png" alt="Categories" /><br />All categories</a></div>

<h2>Update Category</h2>

@if(ViewBag.Message != null)
{
    @ViewBag.Message
}else
{

    using (Html.BeginForm())
    {
        @Html.ValidationSummary()
        <table id="table_admin">
            <tr>
                <td>
                    Name
                </td>
                <td>
                    @Html.TextBoxFor(x => x.Name)
                </td>
            </tr>
            <tr>
                <td>
                    Description
                </td>
                <td>
                    @Html.TextBoxFor(x => x.Description)
                </td>
            </tr>
            <tr>
                <td colspan="2">
                    @Html.HiddenFor(x=>x.Id)
                    <input type="submit" name="subUpdateCategory" value="Edit"/>
                </td>
            </tr>
        </table>
    }
    
}